import request from "@/utils/request";

/**
 * 获取商品列表数据
 * @param params
 * @returns {Promise<unknown>}
 */
export function getGoodsList(params = {}){
  return request({
    url: '/goods/getGoodsList',
    method: 'get',
    params
  })
}

/**
 * 获取商品数据
 * @param params
 * @returns {Promise | Promise<unknown>}
 */
export function getSuitGoodsList(params = {}){
  return request({
    url: `/goods/getSuitGoodsList`,
    params
  })
}

/**
 * 保存商品尺寸
 * @param data
 * @returns {Promise<unknown>}
 */
export function saveGoodsSize(data){
  return request({
    url: `/goods/saveGoodsSize`,
    data,
    method: 'put',
  })
}

/**
 * 保存商品尺寸
 * @param data
 * @returns {Promise | Promise<unknown>}
 */
export function saveGoodsSizeV2(data){
  return request({
    url: '/goods/saveGoodsSizeV2',
    data,
    method: 'put',
  })
}
